package com.lory.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description TODO
 * @Author lory
 * @Date 2020/3/13 0013
 **/
@Configuration
public class MySelfRule {

    /**
     * 定义负载策略为随机
     */
    @Bean
    public IRule myRule(){
        return new RandomRule();
    }
}
